home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / fade-tp / fade.doc < prev    next >
Text File  |  1994-09-27  |  3KB  |  51 lines

  1.       FADE.TPU    -=-    Turbo Pascal Fading Routine    -=-    By Mike Schutz
  2.                                September,  1994
  3.  
  4.            Hello, fellow Pascal programmers.  This is probably the smallest
  5.        Turbo Pascal Unit in distribution, so I'm going to try to make the
  6.        "documentation" as short as the code is.
  7.  
  8.            First of all, as in all things, I am not responsible with what
  9.        you do with this, and I am not responsible for what happens when you
  10.        do whatever you do with it.  In other words, it works fine on my
  11.        computer, it should work on yours, but I make no gaurantee.
  12.  
  13.            The unit contains two interfaced procedures.  These follow:
  14.                              PROCEDURE FadeOut;
  15.                              PROCEDURE ResetTextMode;
  16.  
  17.            PROCEDURE FadeOut simply fades the screen to black.  Simple enough?
  18.        Ok, I'll explain in terribly boring detail:  The palette of the screen
  19.        is sequentially adjusted towards zero.  The R, G, and B values are
  20.        simply decremented until they reach a state of zero.  And we all know
  21.        what happens when there is no red or green or blue on your screen.
  22.  
  23.            PROCEDURE ResetTextMode does exactally what it says, too.  You
  24.        really shouldn't have too much use for this one unless you can't figure
  25.        out how to get back to text mode.  This is painfully simple, so I'll
  26.        show you what it looks like:
  27.               PROCEDURE ResetTextMode;
  28.                  BEGIN
  29.                    asm
  30.                         mov        ax,03h
  31.                         int        10h
  32.                    end;
  33.                  END;
  34.            I'm almost embarrased to include such simple code, but I guess
  35.        probably are some people out there who are less educated in the field
  36.        than I am (and believe me, if you know something, we're about on the
  37.        same level.. <grin>).
  38.  
  39.            Well, this is getting to be almost as long as the code itself, so
  40.        I'm going to wrap it up here.  I've included FADEAWAY.PAS, a generic,
  41.        cheesy, pointless little program that fades away the screen and dumps
  42.        you back to text mode.  Enjoy yourselves.
  43.            I've got plenty more where this came from, so if I ever get off my
  44.        lazy butt and document something, you can find it wherever you found
  45.        this.  Cya.
  46.  
  47.            And if for any reason you would want to get back to me, you can
  48.        reach me via Internet at:
  49.                     mschutz@cap.gwu.edu
  50.  
  51.